home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc / Sample Code / CALib & You… / Source / CALib / StubSources / CALib.stub.cpp
Encoding:
C/C++ Source or Header  |  1995-12-07  |  11.2 KB  |  565 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        CALib.stub.cpp
  3.  
  4.     Contains:    Container Application Library stub file (public for linking)
  5.  
  6.     Written by:    Steve Foley
  7.  
  8.     Copyright:    © 1995 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.         <4>     5/11/95        RB        Added CAGetEmbeddedFrameRef
  13.         <3>         4/23/95    RB        Added CAGetFocusOwner
  14.                                     Added CAFrameRefValid(), CAFrameRefCopy(), CAFrameRefEqual()
  15.         <2+>    4/20/95        SJF        Cleanup unwanted methods and conform to .exp ordering
  16.         <2>        4/19/95        RB        Updated to CALib Layout API changes
  17.         <1>        4/19/95        SJF        Created file
  18.  
  19.     To Do:
  20.         - Implement
  21. */
  22.  
  23.  
  24. #ifndef __DRAG__
  25. #include <Drag.h>            // For DragTrackingHandler type, etc.
  26. #endif
  27.  
  28. #ifndef __EDITIONS__
  29. #include <Editions.h>        // For SectionHandle type, etc.
  30. #endif
  31.  
  32. #ifndef __CODEFRAGMENTS__
  33. #include <CodeFragments.h>
  34. #endif
  35.  
  36. #ifndef _CALIB_
  37. #include "CALib.h"
  38. #endif
  39.  
  40. #pragma segment CALib
  41.  
  42. //=========================================================================
  43. // CALib Public API - just enough code to build a stub library
  44. //=========================================================================
  45.  
  46. extern "C" pascal OSErr CALibCFMInit (InitBlockPtr );
  47. pascal OSErr CALibCFMInit (InitBlockPtr )
  48. {
  49.     return (OSErr(0L));
  50.  
  51. }
  52.  
  53. //=========================================================================
  54. // Error reporting
  55. //=========================================================================
  56.  
  57. pascal    OSErr        CAError(        void )
  58. {
  59.     return (OSErr(0L));
  60. }
  61.  
  62. pascal    CAErrorProc    CASetErrorProc( CAErrorProc )
  63. {
  64.     return (CAErrorProc(0L));
  65. }
  66.  
  67. //=========================================================================
  68. // Session
  69. //=========================================================================
  70.  
  71. pascal    void    CAInit(            void )
  72. {
  73. }
  74.  
  75. pascal    void    CAShutdown(        void )
  76. {
  77. }
  78.  
  79. //=========================================================================
  80. // Document API
  81. //=========================================================================
  82. pascal    CADocumentRef    CACreateDocument(    FSSpecPtr docSpec, 
  83.                                             Handle        docHandle)
  84. {
  85.     return (CADocumentRef)0L;
  86. }
  87.  
  88. pascal    void            CASetDocumentKind(    CADocumentRef, CAISOStr )
  89. {
  90. }
  91.  
  92. pascal    CAISOStr        CAGetDocumentKind(    CADocumentRef)
  93. {
  94. }
  95.  
  96. //-------------------------------------------------------------------------
  97. // CAOpenDocument() :
  98. //-------------------------------------------------------------------------
  99. pascal    CADocumentRef    CAOpenDocument(            FSSpecPtr,
  100.                                                 Handle,
  101.                                                 CAOffset,
  102.                                                 CASize)
  103. {
  104.     return (CADocumentRef)0L;
  105. }
  106.  
  107. pascal    Boolean            CAHasDocumentChanged(    CADocumentRef )
  108. {
  109.     return false;
  110. }
  111.  
  112. pascal    void             CASaveDocument(            CADocumentRef,
  113.                                                 FSSpecPtr,
  114.                                                 Handle*,
  115.                                                 CAOffset,
  116.                                                 CASize* )
  117. {
  118. }
  119.                                                 
  120. pascal    void             CACloseDocument(        CADocumentRef )
  121. {
  122. }
  123.  
  124.  
  125. pascal void                CAAddKind(                CADocumentRef document, CAISOStr kind){}
  126. pascal void                CARemoveKind(            CADocumentRef document, CAISOStr kind){}
  127. pascal CAISOStr            CACurrentKind(            CADocumentRef document){}
  128. pascal Boolean            CAUseKind(                CADocumentRef document, CAISOStr kind, short index){}
  129. pascal CAISOStr            CAGetNthKind(            CADocumentRef document, short index){}
  130. pascal short            CAGetKindCount(            CADocumentRef document){}
  131.  
  132.  
  133. //=========================================================================
  134. // Stream
  135. //=========================================================================
  136.  
  137. pascal    void    CARead(            CADocumentRef,
  138.                                 char*,
  139.                                 CASize* )
  140. {
  141. }
  142.  
  143. pascal    void    CAWrite(        CADocumentRef,
  144.                                 char*,
  145.                                 CASize* )
  146. {
  147. }
  148.  
  149. /*
  150. pascal    void    CAWritePromise(    CADocumentRef, CAISOStr, char*, CASize*)
  151. {
  152.  
  153. }*/
  154.  
  155. pascal    CASize    CAGetSize(        CADocumentRef )
  156. {
  157.     return (CASize)0L;
  158. }
  159.  
  160. pascal    CASize    CAGetOffset(    CADocumentRef )
  161. {
  162.     return (CASize)0L;
  163. }
  164.  
  165. pascal    void    CASetOffset(    CADocumentRef, CASize )
  166. {
  167. }
  168.  
  169. pascal    void    CAInsert(        CADocumentRef,
  170.                                 char*,
  171.                                 CASize* )
  172. {
  173. }
  174.  
  175. pascal    void    CADelete(        CADocumentRef,
  176.                                 char*,
  177.                                 CASize* )
  178. {
  179. }
  180.  
  181. //=========================================================================
  182. // Data Interchange
  183. //=========================================================================
  184.  
  185. pascal    CACloneKey    CABeginClone(        CADocumentRef,
  186.                                         CADocumentRef,
  187.                                         CACloneKind )
  188. {
  189.     return (CACloneKey)0L;
  190. }
  191.  
  192. pascal    void        CAEndClone(            CADocumentRef, 
  193.                                         CADocumentRef, 
  194.                                         CACloneKey )
  195. {
  196. }
  197.  
  198. pascal    CAFrameRef        CACloneFrameRef(CAFrameRef,    
  199.                                         // can be NULL if only one frame in source document
  200.                                         CADocumentRef,
  201.                                         CADocumentRef,
  202.                                         Boolean,
  203.                                         CACloneKey )
  204. {
  205. }
  206.  
  207.  
  208. //=========================================================================
  209. // Clipboard
  210. //=========================================================================
  211.  
  212. pascal    CADocumentRef CAGetClipboardDocument()
  213. {
  214.     return (CADocumentRef)0L;
  215. }
  216.  
  217.  
  218. pascal    void            CAExportClipboard(void)
  219. {
  220.  
  221. }
  222.  
  223.  
  224. //=========================================================================
  225. // Drag and Drop
  226. //=========================================================================
  227.  
  228. pascal    CADocumentRef CAGetDragDropDocument(    ItemReference    theItem )
  229. {
  230.     return (CADocumentRef)0L;
  231. }
  232.  
  233. pascal    CADropResult            CAStartDrag(    CADocumentRef    document,
  234.                                                 EventRecord*    event,
  235.                                                 RgnHandle        dragRgn)
  236. {
  237. }
  238.  
  239. pascal    void            CASetDataSendProc(        CADocumentRef    document,
  240.                                                 DragSendDataUPP sendProc,
  241.                                                 void*            refCon)
  242. {
  243. }
  244.  
  245. pascal    OSErr CAInstallTrackingHandler(         DragTrackingHandler,
  246.                                                 WindowPtr,
  247.                                                  void* )
  248. {
  249.     return noErr;
  250. }
  251.  
  252. pascal    OSErr CAInstallReceiveHandler(             DragReceiveHandler,
  253.                                                 WindowPtr,
  254.                                                 void* )
  255. {
  256.     return noErr;
  257. }
  258.  
  259.  
  260. pascal OSErr     CARemoveTrackingHandler(     DragTrackingHandler, WindowPtr)
  261. {
  262.     return noErr;
  263. }
  264.  
  265. pascal OSErr     CARemoveReceiveHandler(     DragReceiveHandler, WindowPtr)
  266. {
  267.     return noErr;
  268. }
  269.  
  270. //=========================================================================
  271. // Linking
  272. //=========================================================================
  273.  
  274. pascal    CADocumentRef    CAGetEditionDocument( SectionHandle*, CACloneKind )
  275. {
  276.     return (CADocumentRef)0L;
  277. }
  278.  
  279. //=========================================================================
  280. //    Window Management
  281. //=========================================================================
  282.  
  283. pascal    Boolean    CAIsPartWindow(                WindowPtr )
  284. {
  285.     return true;
  286. }
  287.  
  288. pascal    WindowPtr        CAGetFrontDocWindow(        void )
  289. {
  290.     return (WindowPtr)0L;
  291. }
  292.  
  293. pascal    WindowPtr        CAGetFrontFloatingWindow(    void )
  294. {
  295.     return (WindowPtr)0L;
  296. }
  297.  
  298. pascal    void            CASelectWindow(                WindowPtr )
  299. {
  300. }
  301.  
  302. pascal    void            CARegisterRootWindow(        WindowPtr,
  303.                                                     CADocumentRef)
  304. {
  305. }
  306.  
  307. pascal    void            CARegisterFloatingWindow(    WindowPtr)
  308. {
  309. }
  310.  
  311. pascal    void            CAUnregisterWindow(            WindowPtr )
  312. {
  313. }
  314.  
  315. //=========================================================================
  316. //    Window Management Callbacks (Optional)
  317. //=========================================================================
  318.  
  319.  
  320. pascal    OSErr        CAInstallWindowActivateHandler (CAWindowActivateHandler,
  321.                                                     CADocumentRef)
  322. {
  323.     return noErr;
  324. }
  325.  
  326. pascal    OSErr        CAInstallFloatingWindowHandlers (    CASelectWindowHandler    handler1,
  327.                                                         CAFrontWindowHandler    handler2,
  328.                                                         CAIsFloaterHandler        handler3)
  329. {
  330.     return noErr;
  331. }
  332.  
  333. //=========================================================================
  334. // Focus Arbitration ***
  335. //=========================================================================
  336.  
  337. pascal    Boolean        CARequestStandardFocusSet(         WindowPtr )
  338. {
  339.     return false;
  340. }
  341.  
  342. pascal    Boolean        CARequestModalFocus(             WindowPtr )
  343. {
  344.     return false;
  345. }
  346.  
  347. pascal    void        CARelinquishStandardFocusSet(     WindowPtr )
  348. {
  349. }
  350.  
  351. pascal    void        CARelinquishModalFocus(         WindowPtr )
  352. {
  353. }
  354.  
  355. pascal    void        CAInstallFocusNotification(     CAFocusAcquiredProc,
  356.                                                     CAFocusLostProc,
  357.                                                     CADocumentRef)
  358. {
  359. }
  360.  
  361.  
  362.  
  363. //=========================================================================
  364. // Layout
  365. //=========================================================================
  366.  
  367.                                                     
  368. pascal    void        CAInstallFrameShapeRequestHandler (    CAFrameShapeRequestHandler handler,
  369.                                                         CADocumentRef    document)
  370. {
  371. }
  372.                                                     
  373. pascal    CAFrameRef    CAGetRootFrameRef (    CADocumentRef)
  374. {
  375. }
  376.  
  377. pascal    void        CARemoveFrameRef(    CADocumentRef, CAFrameRef )
  378. {
  379. }
  380.  
  381. pascal    RgnHandle    CAGetFrameRgn(        CADocumentRef, CAFrameRef )
  382. {
  383.     return (RgnHandle)0L;
  384. }
  385.  
  386. pascal    void        CASetFrameRgn(        CADocumentRef, 
  387.                                         CAFrameRef, 
  388.                                         RgnHandle)
  389. {
  390. }
  391.  
  392. pascal    RgnHandle    CAGetUsedRgn(        CADocumentRef, CAFrameRef)
  393. {
  394.     return (RgnHandle)0L;
  395. }
  396.  
  397. pascal    void    CAGetFrameTransform(CADocumentRef, CAFrameRef, CATransform*)
  398. {
  399. }
  400.  
  401. pascal    void    CASetFrameTransform(    CADocumentRef, CAFrameRef, CATransform*)
  402. {
  403. }
  404.  
  405. pascal    Boolean        CAGetFrozen(            CADocumentRef, CAFrameRef )
  406. {
  407.     return false;
  408. }
  409.  
  410. pascal    void        CASetFrozen(        CADocumentRef,
  411.                                         CAFrameRef,
  412.                                         Boolean )
  413. {
  414. }
  415.  
  416. pascal Boolean        CAActiveBorderContainsPoint(    Point mouse)
  417. {
  418.     return false;
  419. }
  420.  
  421. pascal    CAVisFrame    CAGetVisFrame(        CADocumentRef, CAFrameRef )
  422. {
  423.     return (CAVisFrame)0L;
  424. }
  425.  
  426. pascal    CAVisFrame    CAMakeVisFrame(            CADocumentRef,
  427.                                             CAFrameRef,
  428.                                             RgnHandle,
  429.                                             CATransform*,
  430.                                             GrafPtr)
  431. {
  432.     return (CAVisFrame)0L;
  433. }
  434.  
  435. pascal    void        CAAdjustVisFrame(    CAVisFrame,
  436.                                         RgnHandle,
  437.                                         CATransform* )
  438. {
  439. }
  440.  
  441. pascal    void        CARemoveVisFrame(    CAVisFrame)
  442. {
  443. }
  444.  
  445. pascal void    CAGetVisFrameTransform(    CADocumentRef, CAFrameRef, CATransform*)
  446. {
  447. }
  448.  
  449.  
  450. pascal    Boolean        CAGetSelected(        CAVisFrame )
  451. {
  452.     return false;
  453. }
  454.  
  455. pascal    void        CASetSelected(        CAVisFrame, Boolean )
  456. {
  457. }
  458.  
  459. pascal    CAHighlight     CAGetHighlight(    CAVisFrame )
  460. {
  461.     return (CAHighlight)0L;
  462. }
  463.  
  464. pascal    void        CASetHighlight(        CAVisFrame, CAHighlight )
  465. {
  466. }
  467.  
  468.  
  469. pascal void        CAMoveTransformBy(        CATransform*, Point )
  470. {
  471. }
  472.  
  473. pascal void        CAMoveTransformTo(        CATransform*, Point )
  474. {
  475. }
  476.  
  477.  
  478. pascal Boolean CAShowPartFrameInfo(CADocumentRef document, CAVisFrame visFrame)
  479. {
  480. }
  481.  
  482. pascal void        CAViewFrameInWindow (CADocumentRef, CAFrameRef)
  483. {
  484.  
  485. }
  486.  
  487. //=========================================================================
  488. // Imaging
  489. //=========================================================================
  490.  
  491. pascal    GrafPtr        CAGetCanvas(                    CAVisFrame, CAGraphicsSystem )
  492. {
  493.     return (GrafPtr)0L;
  494. }
  495.  
  496. pascal    void        CADrawFrame(                    CAVisFrame, 
  497.                                                     RgnHandle )
  498. {
  499. }
  500.  
  501. pascal    void        CAInstallCanvasNotification(     CACanvasUpdatedProc, CADocumentRef )
  502. {
  503. }
  504.  
  505. pascal    void        CADrawActiveBorder(                    void )
  506. {
  507. }
  508. //-------------------------------------------------------------------------
  509. // Menu ***
  510. //-------------------------------------------------------------------------
  511.  
  512. pascal    void        CASetBaseMenuBar(        Handle )
  513. {
  514. }
  515.  
  516. pascal    void        CAAdjustMenus(            void )
  517. {
  518. }
  519.  
  520. pascal    void        CARegisterCommand(        CACommandID,
  521.                                             CAMenuID,
  522.                                             CAMenuItemID )
  523. {
  524. }
  525.  
  526. pascal    Boolean        CADispatchMenuEvent(    EventRecord*, long )
  527. {
  528.     return false;
  529. }
  530.  
  531. //-------------------------------------------------------------------------
  532. // UI Events ***
  533. //-------------------------------------------------------------------------
  534.  
  535. pascal    Boolean        CADispatchEvent(             EventRecord*, CAEventInfo* )
  536. {
  537.     return false;
  538. }
  539.  
  540.  
  541. pascal    RgnHandle    CAGetMouseRegion(            void )
  542. {
  543.     return (RgnHandle)0L;
  544. }
  545.  
  546. pascal    long        CAGetSleepTime(                void )
  547. {
  548.     return 0L;
  549. }
  550.  
  551. pascal    void        CAInstallBorderAdjuster(     CADocumentRef, CAAdjustBorderProc )
  552. {
  553. }
  554.  
  555.  
  556.  
  557. //-------------------------------------------------------------------------
  558. // Undo ***
  559. //-------------------------------------------------------------------------
  560.  
  561. pascal    void        CAClearUndo( void )
  562. {
  563. }
  564.  
  565.